from django.views.static import serve  # 上传文件处理函数
from .settings import MEDIA_ROOT  # 从配置中导入MEDIA_ROOT
from django.contrib import admin
from django.urls import path, include,re_path

urlpatterns = [
    path('admin/', admin.site.urls),
    path('user/', include("User.urls")),
    path('student/', include("student.urls")),
    path('test/', include("Test.urls")),
    path('replay/', include("replay.urls")),
    path('knowledge/', include("knowledge.urls")),
    re_path(r'^upload/(?P<path>.*)$', serve, {"document_root":MEDIA_ROOT})
]
# path('/upload/',serve,{"document_root":MEDIA_ROOT}),
